Skip to content

Conversation

oliveror
Copy link
Member

Fix the following issues:

  • Add 3:2 crop to Recipe thumbnail
  • Update ingredients to use name, unit and amount instead of a single text string
  • Update responsive design of ingredients fields
  • Fix mobile re-ordering not working for instructions and ingredients

Closes #50

@oliveror oliveror self-assigned this Oct 13, 2026
@oliveror oliveror requested a review from a team as a code owner October 13, 2026 13:10
Copy link
Member

@olestan olestan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Here are some suggestions for improvements, with a mix of my own and AI's thoughts.

Changes I think should be made

  • Crop can be skipped by closing the dialog (RecipeCreatePage.tsx:337–362)
    If I select an image and then close/cancel the crop dialog, the original image is still selected. This means the 3:2 crop can basically be skipped. I think the image should only be committed when clicking Use image, or the preview should be cleared/restored when cancelling.

  • The cropped image is only used for the preview (RecipeCreatePage.tsx:53–84, 350–362)
    The crop result is stored as an object URL, but the file input still contains the original file. So once uploading is connected, it looks like the original uncropped image would be uploaded. Would probably be better to keep the cropped Blob/File in state as the actual selected image.

Improvements

  • Ingredient rows are hard to distinguish on smaller screens
    On mobile, the ingredient fields kind of blend together, so it's difficult to see where one ingredient ends and the next starts. Some extra spacing, a divider, or another form of visual grouping between ingredients would help a lot.

  • The crop dialog scrollbar is really small
    The scrollbar on the right side of the crop dialog is pretty hard to grab/use, especially on a smaller screen. Could be nice to make this a bit more accessible/easier to interact with.

  • Ingredient errors are attached to the Name field (RecipeCreatePage.tsx:782–825)
    If e.g. Amount is missing/invalid, the error is shown under Name, and Amount isn't marked as invalid. It would be nicer to have field-specific errors for name, amount, and unit, so it's clear which value actually needs fixing.

@oliveror oliveror requested a review from olestan October 15, 2026 08:45
Copy link
Member

@olestan olestan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recipe ingredients could still be more clearly seperated on a smaller screen, but looks good to merge.

@olestan olestan merged commit 9d7ede3 into dev Oct 16, 2026
2 checks passed
@olestan olestan deleted the 50-minor-fixes-for-add-recipe branch October 16, 2026 11:52
olestan pushed a commit that referenced this pull request Oct 16, 2026
* fix(recipes): improve Add Recipe form

* chore(Add Recipe): run formating and checks for CI

* fix(recipes): refine Add Recipe image and ingredient handling
olestan added a commit that referenced this pull request Oct 16, 2026
…delivery docsDev –> Main) (#55)

feat: improve local development, recipe creation, authentication and delivery docs

* Added Docker for local development

* fix(recipes): improve Add Recipe form ([#52](#52))
  * improve Add Recipe form
  * refine image and ingredient handling

* feat(auth): share validation and improve authentication handling ([#53](#53))

* docs: add second delivery progress summary ([#54](#54))
  * add second delivery progress summary

Co-authored-by: Ole Stangeland <olestan@stud.ntnu.no>
Co-authored-by: Hasan Mohammad Fawzi <hasanmo@stud.ntnu.no>
Co-authored-by: Hasan Mohammad Fawzi <hasan.fawzi@hoglund.no>
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants